import http from '@/utils/http'
const axios = http;
//获取体检人信息
export const patient = ({
	id
}) => {
	return axios({
		url: `/patient/list`,
		method: 'GET',
		params: {
			id
		}
	})
}
//查询套餐类型
export const packageType = ({
	id,
	name
}) => {
	return axios({
		url: `/app/medical/querypackage`,
		method: 'GET',
	})
}
//查询套餐
export const packageQuery = ({
	id
}) => {
	return axios({
		url: `/app/medical/queryById/${id}`,
		method: 'POST',
		params: {
			id
		}
	})
}
//查询项目详情
export const ProjectDetails = ({
	id
}) => {
	return axios({
		url: `/app/medical/queryByPackageId/${id}`,
		method: 'POST',
		params: {
			id
		}
	})
}

export const appointmentData = ({
	id
}) => {
	return axios({
		url: `/app/medical/queryByRecord/${id}`,
		method: 'POST',
		params: {
			id
		}
	})
}

export const addAppointment = ({
	data
}) => {
	return axios({
		url: `/app/medical/add`,
		method: 'POST',
		data: {

			count: 1,
			packageId: 1,
			patientId: 1,
			place: "6",
			state: 1,
			sum: 1,
			waitingTime: "6"
		}
	})
}

export const medicalPerson = ({
	id
}) => {
	return axios({
		url: `/app/medicalPerson/selectMaxById/${id}`,
		method: 'POST',
		params: {
			id
		}
	})
}
export const medicalPersonPackage = ({
	id
}) => {
	return axios({
		url: `/app/medicalPerson/selectReportById/${id}`,
		method: 'POST',
		params: {
			id
		}
	})
}

export const medicalPackageItem = ({
	id,
	reportId
}) => {
	return axios({
		url: `/app/medicalPerson/queryByPatientId`,
		method: 'POST',
		params: {
			id,
			reportId
		}
	})
}
export const medicalPatien = ({
	id,
	StartTime,
	EndingTime
}) => {
	return axios({
		url: `/app/medicalPerson/selectByPatientId`,
		method: 'POST',
		params: {
			id,
			StartTime,
			EndingTime
		}
	})
}
